package com.nami.gate.constants;

/**
 * 描述：
 *
 * @Author: lbc
 * @Date: 2023-07-13 10:53
 * @email: 594599620@qq.com
 * @Description: keep coding
 */
public interface NettyConstants {

    /**
     * boss 需要的线程数
     */
    int NETTY_BOSS_THREAD_NUM = 1;

    /**
     * boss线程前缀
     */
    String NETTY_BOSS_GROUP_THREAD_NAME_PREFIX = "_im-boss-";

    String NETTY_WORK_GROUP_THREAD_NAME_PREFIX = "_im-work-";

    /**
     * work线程数
     */
    int DEFAULT_IO_THREADS = Math.min(Runtime.getRuntime().availableProcessors() + 1, 32);

    /**
     * 解析包头长度
     */
    int NETTY_MESSAGE_HEADER_LENGTH = 12;

    int FRAME_LENGTH = 8;

    /**
     * netty ws服务， 注册进nacos注册中心
     */
    String NACOS_REGISTER_WS_KEY = "nami-netty-gate-ws";

    /**
     * netty tcp服务， 注册进nacos注册中心
     */
    String NACOS_REGISTER_TCP_KEY = "nami-netty-gate-tcp";

    String NACOS_DEFAULT_GROUP = "DEFAULT_GROUP";

}
